import instance from '@/utils/request'

export function getClassify (page, pageSize, title = '', begin = '', end = '') {
  return instance.get(`/api/classify?page=${page}&pageSize=${pageSize}&title=${title}&begin=${begin}&end=${end}`)
}

export function addClassify (form) {
  return instance.post('/api/classify', form)
}

export function changeClassify (form) {
  return instance.put('/api/classify', form)
}

export function deleteClassify (idList) {
  const str = '/api/classify/' + idList.map(item => item)
  return instance.delete(str)
}
